package cn.zengdeai.langchain4j_springboot.service;


import dev.langchain4j.agent.tool.P;
import dev.langchain4j.agent.tool.Tool;
import org.springframework.stereotype.Service;

@Service
public class ToolsService {

    @Tool("城市有多少个名字的")
    public  Integer changshaNameCount(
            @P("地名")
            String place,
            @P("姓名")
            String name){
        System.out.println(place);
        System.out.println(name);
        return 10;
    }

    @Tool("航班号退票姓名")
    public  String cancelBooking(
            @P("航班号")
            String bookingNumber,
            @P("姓名")
            String name){
        System.out.println(bookingNumber);
        System.out.println(name);
        return "退票成功";
    }
}
